package utils
{
	import mx.resources.IResourceManager;
	import mx.resources.ResourceManager;
	
	public class LanguageUtil
	{
		public static const I18N_FILENAME:String="message";
		private static var _instance:LanguageUtil;
		private static var s_RESOURCE:IResourceManager=ResourceManager.getInstance();
		
		public function LanguageUtil(){
			if(_instance)
			   throw new Error();
			   s_RESOURCE.localeChain=["zh_CN","en_US"];
		}
		
 		public function getString(key:String):String{
			return s_RESOURCE.getString(I18N_FILENAME,key);
		}
		
		public static function getInstance():LanguageUtil{
			if(!_instance){
				_instance=new LanguageUtil();
			}
			return _instance;
		}
	}
}